Repository navigation
Fix recursion error in moxa_serial module - #935
Merged
Merged
Conversation
…ockingIOError) in reading data
In `readbuf()`, use a byte type string for `msg` and `msg_current`.
BrianJKoopman
added a commit
that referenced
this pull request
Oct 15, 2025
That change has been split out to #935.
5 of 6 tasks
BrianJKoopman
added a commit
that referenced
this pull request
Oct 16, 2025
* update moxa_serial.py to use specific exceptions (TimeoutError and BlockingIOError) in reading data
* Committer: sadachi5 <adachi@daq-satp1.simonsobs.org>
On branch fix_wiregrid_tiltsensor_RecursionError
Your branch is up to date with 'origin/fix_wiregrid_tiltsensor_RecursionError'.
Changes to be committed:
modified: agent.py
modified: drivers/dwl.py
modified: drivers/sherborne.py
- agent.py: Add reconnect function if the read data is wronge
- agent.py: Comment-out a function that has not been implemented (`get_temperatures()`)
- drivers/dwl.py: Fix the return values to -999 if the read data is wrong
- drivers/dwl.py, sherborne.py: In `__del__()`, there was unavailable attribute
`self.ser.close()`. It was changed to `self.ser.sock.close()`.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update moxa_serial.py
* Update moxa_serial.py
In `readbuf()`, use a byte type string for `msg` and `msg_current`.
* Undo moxa_serial recursion fix
That change has been split out to #935.
* Add note about possibly dropping support for 'sherborne'
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Brian Koopman <brian.koopman@yale.edu>
Contributor
|
@BrianJKoopman Is there anything to be modified on my side for this PR? |
Since we were catching BaseException before, there's some chance we were catching something that isn't a TimeoutError or BlockingIOError. This catches anything else and logs it, just in case.
Member
Author
Yeah, sorry, I was meaning to add more general exception handling, but got distracted before traveling. I wanted to add this since we were catching Added in b002944. |
laurensaunders
pushed a commit
that referenced
this pull request
Feb 19, 2026
* update moxa_serial.py to use specific exceptions (TimeoutError and BlockingIOError) in reading data
* Committer: sadachi5 <adachi@daq-satp1.simonsobs.org>
On branch fix_wiregrid_tiltsensor_RecursionError
Your branch is up to date with 'origin/fix_wiregrid_tiltsensor_RecursionError'.
Changes to be committed:
modified: agent.py
modified: drivers/dwl.py
modified: drivers/sherborne.py
- agent.py: Add reconnect function if the read data is wronge
- agent.py: Comment-out a function that has not been implemented (`get_temperatures()`)
- drivers/dwl.py: Fix the return values to -999 if the read data is wrong
- drivers/dwl.py, sherborne.py: In `__del__()`, there was unavailable attribute
`self.ser.close()`. It was changed to `self.ser.sock.close()`.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update
* update moxa_serial.py
* Update moxa_serial.py
In `readbuf()`, use a byte type string for `msg` and `msg_current`.
* Undo moxa_serial recursion fix
That change has been split out to #935.
* Add note about possibly dropping support for 'sherborne'
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Brian Koopman <brian.koopman@yale.edu>
laurensaunders
pushed a commit
that referenced
this pull request
Feb 19, 2026
* update moxa_serial.py to use specific exceptions (TimeoutError and BlockingIOError) in reading data * update * update moxa_serial.py * Update moxa_serial.py In `readbuf()`, use a byte type string for `msg` and `msg_current`. * Add general exception handling Since we were catching BaseException before, there's some chance we were catching something that isn't a TimeoutError or BlockingIOError. This catches anything else and logs it, just in case. --------- Co-authored-by: Shunsuke Adachi <38268229+sadachi5@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR contains the relevant changes originally from #924 to the issue described in #891.
Motivation and Context
Resolves #891.
Split since this has potential impact on more than just the wiregrid agents and I'd like to keep it separated from the reconnection handling work in #924.
How Has This Been Tested?
This, along with the changes in #924, was run with the wiregrid tiltsensor agent. Tests have not been done on other agents that use the
moxa_serialmodule, such as the PMX agents.Types of changes
Checklist: